package com.huawei.gamebox.service.welfare.gift.card;

import android.content.Context;
import android.view.View;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.gamebox.service.welfare.common.card.GsTitleCard;
import com.huawei.gamebox.service.welfare.gift.bean.GameGiftCardBean;
import com.huawei.gamebox.service.welfare.gift.bean.GameGiftCardListBean;
import o.cgz;
import o.fcc;

public class VerticalScrollGameGiftListCard extends BaseGiftCard {
    private GsTitleCard ˋ = null;

    public VerticalScrollGameGiftListCard(Context context) {
        super(context);
    }

    public GsTitleCard ˊ() {
        return this.ˋ;
    }

    public void ॱ(GsTitleCard gsTitleCard) {
        this.ˋ = gsTitleCard;
    }

    public cgz ˏ(View view) {
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        if (cardBean != null) {
            int size;
            super.ˏ(cardBean);
            CardBean cardBean2 = (GameGiftCardListBean) cardBean;
            if (this.ˋ != null) {
                this.ˋ.ˏ(cardBean2);
            }
            if (cardBean2.ˊ() != null) {
                size = cardBean2.ˊ().size();
            } else {
                size = 0;
            }
            for (int i = 0; i < ˋ(); i++) {
                fcc o_fcc = (fcc) ˊ(i);
                if (o_fcc != null) {
                    boolean z;
                    if (this.ˋ != null) {
                        z = true;
                    } else {
                        z = false;
                    }
                    o_fcc.ˎ(z);
                    if (i >= size) {
                        o_fcc.ˉ().setVisibility(8);
                    } else {
                        o_fcc.ˉ().setVisibility(0);
                        CardBean cardBean3 = (GameGiftCardBean) cardBean2.ˊ().get(i);
                        cardBean3.ˋˋ(cardBean.ॱˉ());
                        o_fcc.ˏ(cardBean3);
                    }
                }
            }
        }
    }
}
